Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
{
xResourceReq *resource_req;
xGetPropertyReq *prop_req;
- Window window = state.children[i];
+ Window win = state.children[i];
if (get_wm_state)
{
GetReq (GetProperty, prop_req);
- prop_req->window = window;
+ prop_req->window = win;
prop_req->property = wm_state_atom;
prop_req->type = AnyPropertyType;
prop_req->delete = False;
state.child_states[i].seq[CHILD_INFO_GET_PROPERTY] = dpy->request;
}
- GetResReq(GetWindowAttributes, window, resource_req);
+ GetResReq(GetWindowAttributes, win, resource_req);
state.child_states[i].seq[CHILD_INFO_GET_WA] = dpy->request;
- GetResReq(GetGeometry, window, resource_req);
+ GetResReq(GetGeometry, win, resource_req);
state.child_states[i].seq[CHILD_INFO_GET_GEOMETRY] = dpy->request;
}
{
gint width, height;
GList *toplevels, *list;
- Window pointer_window, root, child;
+ Window pointer_window;
int rootx = -1, rooty = -1;
int winx, winy;
- unsigned int xmask;
/* FIXME: untrusted clients case not multidevice-safe */
pointer_window = None;
{
gint width, height;
GList *toplevels, *list;
- Window pointer_window, root, child;
+ Window pointer_window;
/* FIXME: untrusted clients case not multidevice-safe */
pointer_window = None;
case XIKeyClass:
{
XIKeyClassInfo *key_info = (XIKeyClassInfo *) class_info;
- gint i;
_gdk_device_set_keys (device, key_info->num_keycodes);
if (gdk_device_get_mode (event->motion.device) == GDK_MODE_WINDOW)
{
- GdkDevice *device = event->motion.device;
-
/* Update event coordinates from axes */
- gdk_device_get_axis (device, event->motion.axes, GDK_AXIS_X, &event->motion.x);
- gdk_device_get_axis (device, event->motion.axes, GDK_AXIS_Y, &event->motion.y);
+ gdk_device_get_axis (event->motion.device, event->motion.axes, GDK_AXIS_X, &event->motion.x);
+ gdk_device_get_axis (event->motion.device, event->motion.axes, GDK_AXIS_Y, &event->motion.y);
}
}
break;
static void
gdk_window_queue (GdkWindow *window,
- GdkWindowQueueItem *item)
+ GdkWindowQueueItem *new_item)
{
GdkX11Display *display_x11 = GDK_X11_DISPLAY (GDK_WINDOW_DISPLAY (window));
}
}
- item->window = window;
- item->serial = NextRequest (GDK_WINDOW_XDISPLAY (window));
+ new_item->window = window;
+ new_item->serial = NextRequest (GDK_WINDOW_XDISPLAY (window));
g_object_add_weak_pointer (G_OBJECT (window),
- (gpointer *)&(item->window));
+ (gpointer *)&(new_item->window));
- g_queue_push_tail (display_x11->translate_queue, item);
+ g_queue_push_tail (display_x11->translate_queue, new_item);
}
void
for (i = 0; i < map_size; i++)
{
/* Get the key code at this point in the map. */
- gint keycode = keymap_x11->mod_keymap->modifiermap[i];
+ gint code = keymap_x11->mod_keymap->modifiermap[i];
gint j;
KeySym *syms;
guint mask;
/* Ignore invalid keycodes. */
- if (keycode < keymap_x11->min_keycode ||
- keycode > keymap_x11->max_keycode)
+ if (code < keymap_x11->min_keycode ||
+ code > keymap_x11->max_keycode)
continue;
- syms = keymap_x11->keymap + (keycode - keymap_x11->min_keycode) * keymap_x11->keysyms_per_keycode;
+ syms = keymap_x11->keymap + (code - keymap_x11->min_keycode) * keymap_x11->keysyms_per_keycode;
mask = 0;
for (j = 0; j < keymap_x11->keysyms_per_keycode; j++)
mask |= GDK_SUPER_MASK;
}
- keymap_x11->modmap[i/keymap_x11->mod_keymap->max_keypermod] |= mask;
+ keymap_x11->modmap[i / keymap_x11->mod_keymap->max_keypermod] |= mask;
/* The fourth modifier, GDK_MOD1_MASK is 1 << 3.
* Each group of max_keypermod entries refers to the same modifier.
Visual *b);
-#ifdef G_ENABLE_DEBUG
-
-static const gchar *const visual_names[] =
-{
- "static gray",
- "grayscale",
- "static color",
- "pseudo color",
- "true color",
- "direct color",
-};
-
-#endif /* G_ENABLE_DEBUG */
-
G_DEFINE_TYPE (GdkX11Visual, gdk_x11_visual, GDK_TYPE_VISUAL)
static void